SABLECC = ../sablecc-3.2/

code: clean
	javac main/Main.java

grammar:
	java -jar $(SABLECC)/lib/sablecc.jar minijava.grammar

all: grammar code

clean:
	rm -f *.class
	rm -f */*.class
	rm -f */*/*.class

cleanall:
	rm -f *.class
	rm -f */*.class
	rm -f */*/*.class
	rm -rf minijava/analysis
	rm -rf minijava/lexer
	rm -rf minijava/node
	rm -rf minijava/parser